package com.bjpowenode.java;

import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;

import java.util.Scanner;

/**
 * @author wuyuecai
 * @create 2021-05-30 20:54
 */
public class TestString {
    public static void main(String[] args) {
//        String[] stringArray = new String[3]; // 各元素的值默认为null
//        for (int i = 0; i < stringArray.length; i++) { // 对各元素进行初始化，但没有赋值。
//            stringArray[i] = new String();//使用new String()初始化
//            System.out.println(stringArray[i]+"*******");
//        }
        String s1 = "javaEE";
        String s2 = "hadoop";

        String s3 = "javaEEhadoop";
        String s4 = "javaEE" + "hadoop";
        String s5 = s1 + "hadoop";
        String s6 = "javaEE" + s2;
        String s7 = s1 + s2;

//        System.out.println(s3 == s4);//true
//        System.out.println(s1);
//        System.out.println(s3 == s5);//false
//        System.out.println(s3 == s6);//false
//        System.out.println(s3 == s7);//false
//        System.out.println(s5 == s6);//false
//        System.out.println(s5 == s7);//false
//        System.out.println(s6 == s7);//false





//        int[][] arr = new int[5][5];
//        for(int[] row: arr){
//            System.out.println(row);
//            for(int data:row){
////                System.out.print(data+"\t");
//                System.out.printf("%d\t",data);
//            }
//            System.out.println();
//        }
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入性别：");
        String sex = scanner.nextLine();

        System.out.println("请输入姓名：");
        String name = scanner.nextLine();


        System.out.println("请输入年龄：");
        int age = scanner.nextInt();

        System.out.println("请输入爱好：");
        String hobby = scanner.nextLine();

        System.out.println("请输入身高：");
        double height = scanner.nextDouble();

        System.out.println("请输入体重：");
        double weight = scanner.nextDouble();


        System.out.println("\n姓名："+name+"\n年龄："+age+"\n性别："
                +sex+"\n身高："+height+"\n体重："+weight+"\n爱好："+hobby);






    }
}
